<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <ul>
      <li v-for="(item, index) of list" :key="index">
        {{ item.area }}
      </li>
    </ul>
  </div>
</body>
<script src="lib/vue.js"></script>
<script src="lib/axios.js"></script>
<script>
  new Vue({
    el: '#app',
    data: {
      list: []
    },
    methods: {
      getCity () {
        return axios.get('https://api.i-lynn.cn/college')
      },
      postLogin () {
        return axios.post('http://121.89.205.189/api/user/login', {
          loginname: '18813007814', password: '123456'
        })
      },
      getProList () {
        return axios.get('http://121.89.205.189/api/pro/list', {
          params: {
            limitNum: 100
          }
        })
      }
    },
    mounted () {
      // Promise.all([this.getCity(), this.postLogin(), this.getProList()]).then(res => {
      //   console.log(res[0].data)
      //   console.log(res[1].data)
      //   console.log(res[2].data)
      // })
      axios.all([this.getCity(), this.postLogin(), this.getProList()]).then(axios.spread((citys, login, prolist) => {
        console.log(citys.data)
        console.log(login.data)
        console.log(prolist.data)
      }))
    }
  })
</script>
</html>